(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("
"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widths?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("

")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("

").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendTo("body").wrap("
").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("
").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery); (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,r){"$:nomunge";function l(e){return e=e||location.href,"#"+e.replace(/^[^#]*#?(.*)$/,"$1")}var i="hashchange",s=n,o,u=e.event.special,a=s.documentMode,f="on"+i in t&&(a===r||a>7);e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.fn[i].delay=50,u[i]=e.extend(u[i],{setup:function(){if(f)return!1;e(o.start)},teardown:function(){if(f)return!1;e(o.stop)}}),o=function(){function p(){var n=l(),r=h(u);n!==u?(c(u=n,r),e(t).trigger(i)):r!==u&&(location.href=location.href.replace(/#.*/,"")+r),o=setTimeout(p,e.fn[i].delay)}var n={},o,u=l(),a=function(e){return e},c=a,h=a;return n.start=function(){o||p()},n.stop=function(){o&&clearTimeout(o),o=r},t.attachEvent&&!t.addEventListener&&!f&&function(){var t,r;n.start=function(){t||(r=e.fn[i].src,r=r&&r+l(),t=e('',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(Q),x("BeforeChange",function(a,b,c){b!==c&&(b===Q?S():c===Q&&S(!0))}),x(b+"."+Q,function(){S()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}});var T=function(a){var b=n.items.length;return a>b-1?a-b:a<0?b+a:a},U=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=n.st.gallery,d=".mfp-gallery",e=Boolean(a.fn.mfpFastClick);n.direction=!0;if(!c||!c.enabled)return!1;v+=" mfp-gallery",x(g+d,function(){c.navigateByImgClick&&n.wrap.on("click"+d,".mfp-img",function(){if(n.items.length>1)return n.next(),!1}),t.on("keydown"+d,function(a){a.keyCode===37?n.prev():a.keyCode===39&&n.next()})}),x("UpdateStatus"+d,function(a,b){b.text&&(b.text=U(b.text,n.currItem.index,n.items.length))}),x(f+d,function(a,b,d,e){var f=n.items.length;d.counter=f>1?U(c.tCounter,e.index,f):""}),x("BuildControls"+d,function(){if(n.items.length>1&&c.arrows&&!n.arrowLeft){var b=c.arrowMarkup,d=n.arrowLeft=a(b.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(m),f=n.arrowRight=a(b.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(m),g=e?"mfpFastClick":"click";d[g](function(){n.prev()}),f[g](function(){n.next()}),n.isIE7&&(y("b",d[0],!1,!0),y("a",d[0],!1,!0),y("b",f[0],!1,!0),y("a",f[0],!1,!0)),n.container.append(d.add(f))}}),x(h+d,function(){n._preloadTimeout&&clearTimeout(n._preloadTimeout),n._preloadTimeout=setTimeout(function(){n.preloadNearbyImages(),n._preloadTimeout=null},16)}),x(b+d,function(){t.off(d),n.wrap.off("click"+d),n.arrowLeft&&e&&n.arrowLeft.add(n.arrowRight).destroyMfpFastClick(),n.arrowRight=n.arrowLeft=null})},next:function(){n.direction=!0,n.index=T(n.index+1),n.updateItemHTML()},prev:function(){n.direction=!1,n.index=T(n.index-1),n.updateItemHTML()},goTo:function(a){n.direction=a>=n.index,n.index=a,n.updateItemHTML()},preloadNearbyImages:function(){var a=n.st.gallery.preload,b=Math.min(a[0],n.items.length),c=Math.min(a[1],n.items.length),d;for(d=1;d<=(n.direction?c:b);d++)n._preloadItem(n.index+d);for(d=1;d<=(n.direction?b:c);d++)n._preloadItem(n.index-d)},_preloadItem:function(b){b=T(b);if(n.items[b].preloaded)return;var c=n.items[b];c.parsed||(c=n.parseEl(b)),z("LazyLoad",c),c.type==="image"&&(c.img=a('').on("load.mfploader",function(){c.hasSize=!0}).on("error.mfploader",function(){c.hasSize=!0,c.loadError=!0,z("LazyLoadError",c)}).attr("src",c.src)),c.preloaded=!0}}});var V="retina";a.magnificPopup.registerModule(V,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=n.st.retina,b=a.ratio;b=isNaN(b)?b():b,b>1&&(x("ImageHasSize."+V,function(a,c){c.img.css({"max-width":c.img[0].naturalWidth/b,width:"100%"})}),x("ElementParse."+V,function(c,d){d.src=a.replaceSrc(d,b)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){r.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g=a(this),h;if(c){var i,j,k,l,m,n;g.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,r.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0];if(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)l=!0,d()}).on("touchend"+f,function(a){d();if(l||n>1)return;h=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){h=!1},b),e()})})}g.on("click"+f,function(){h||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&r.off("touchmove"+f+" touchend"+f)}}(),B()})(window.jQuery||window.Zepto); (function(){ var root=(typeof exports==='undefined' ? window:exports); var config={ retinaImageSuffix:'@2x', check_mime_type: true, force_original_dimensions: true }; function Retina(){} root.Retina=Retina; Retina.configure=function(options){ if(options===null){ options={};} for (var prop in options){ if(options.hasOwnProperty(prop)){ config[prop]=options[prop]; }} }; Retina.init=function(context){ if(context===null){ context=root; } var existing_onload=context.onload||function(){}; context.onload=function(){ var images=document.getElementsByTagName('img'), retinaImages=[], i, image; for (i=0; i < images.length; i +=1){ image=images[i]; if(!!!image.getAttributeNode('data-no-retina')){ retinaImages.push(new RetinaImage(image)); }} existing_onload(); };}; Retina.isRetina=function(){ var mediaQuery='(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)'; if(root.devicePixelRatio > 1){ return true; } if(root.matchMedia&&root.matchMedia(mediaQuery).matches){ return true; } return false; }; var regexMatch=/\.\w+$/; function suffixReplace (match){ return config.retinaImageSuffix + match; } function RetinaImagePath(path, at_2x_path){ this.path=path||''; if(typeof at_2x_path!=='undefined'&&at_2x_path!==null){ this.at_2x_path=at_2x_path; this.perform_check=false; }else{ if(undefined!==document.createElement){ var locationObject=document.createElement('a'); locationObject.href=this.path; locationObject.pathname=locationObject.pathname.replace(regexMatch, suffixReplace); this.at_2x_path=locationObject.href; }else{ var parts=this.path.split('?'); parts[0]=parts[0].replace(regexMatch, suffixReplace); this.at_2x_path=parts.join('?'); } this.perform_check=true; }} root.RetinaImagePath=RetinaImagePath; RetinaImagePath.confirmed_paths=[]; RetinaImagePath.prototype.is_external=function(){ return !!(this.path.match(/^https?\:/i)&&!this.path.match('//' + document.domain)); }; RetinaImagePath.prototype.check_2x_variant=function(callback){ var http, that=this; if(this.is_external()){ return callback(false); }else if(!this.perform_check&&typeof this.at_2x_path!=='undefined'&&this.at_2x_path!==null){ return callback(true); }else if(this.at_2x_path in RetinaImagePath.confirmed_paths){ return callback(true); }else{ http=new XMLHttpRequest(); http.open('HEAD', this.at_2x_path); http.onreadystatechange=function(){ if(http.readyState!==4){ return callback(false); } if(http.status >=200&&http.status <=399){ if(config.check_mime_type){ var type=http.getResponseHeader('Content-Type'); if(type===null||!type.match(/^image/i)){ return callback(false); }} RetinaImagePath.confirmed_paths.push(that.at_2x_path); return callback(true); }else{ return callback(false); }}; http.send(); }}; function RetinaImage(el){ this.el=el; this.path=new RetinaImagePath(this.el.getAttribute('src'), this.el.getAttribute('data-at2x')); var that=this; this.path.check_2x_variant(function(hasVariant){ if(hasVariant){ that.swap(); }}); } root.RetinaImage=RetinaImage; RetinaImage.prototype.swap=function(path){ if(typeof path==='undefined'){ path=this.path.at_2x_path; } var that=this; function load(){ if(! that.el.complete){ setTimeout(load, 5); }else{ if(config.force_original_dimensions){ if(that.el.offsetWidth&&that.el.offsetHeight){ that.el.setAttribute('width', that.el.offsetWidth); that.el.setAttribute('height', that.el.offsetHeight); }else{ that.el.setAttribute('width', that.el.naturalWidth); that.el.setAttribute('height', that.el.naturalHeight); }} that.el.setAttribute('src', path); }} load(); }; if(Retina.isRetina()){ Retina.init(root); }})(); (function($, k, m, i, d){ var e=$(i), g="waypoint.reached", b=function(o, n){ o.element.trigger(g, n); if(o.options.triggerOnce){ o.element[k]("destroy") }}, h=function(p, o){ if(!o){ return - 1 } var n=o.waypoints.length - 1; while (n >=0&&o.waypoints[n].element[0]!==p[0]){ n -=1 } return n }, f=[], l=function(n){ $.extend(this, { element: $(n), oldScroll: 0, waypoints: [], didScroll: false, didResize: false, doScroll: $.proxy(function(){ var q=this.element.scrollTop(), p=q > this.oldScroll, s=this, r=$.grep(this.waypoints, function(u, t){ return p ? (u.offset > s.oldScroll&&u.offset <=q):(u.offset <=s.oldScroll&&u.offset > q) }), o=r.length; if(!this.oldScroll||!q){ $[m]("refresh") } this.oldScroll=q; if(!o){ return } if(!p){ r.reverse() } $.each(r, function(u, t){ if(t.options.continuous||u===o - 1){ b(t, [p ? "down": "up"]) }}) }, this) }); $(n).bind("scroll.waypoints", $.proxy(function(){ if(!this.didScroll){ this.didScroll=true; i.setTimeout($.proxy(function(){ this.doScroll(); this.didScroll=false }, this), $[m].settings.scrollThrottle) }}, this)).bind("resize.waypoints", $.proxy(function(){ if(!this.didResize){ this.didResize=true; i.setTimeout($.proxy(function(){ $[m]("refresh"); this.didResize=false }, this), $[m].settings.resizeThrottle) }}, this)); e.load($.proxy(function(){ this.doScroll() }, this)) }, j=function(n){ var o=null; $.each(f, function(p, q){ if(q.element[0]===n){ o=q; return false }}); return o }, c={ init: function(o, n){ this.each(function(){ var u=$.fn[k].defaults.context, q, t=$(this); if(n&&n.context){ u=n.context } if(!$.isWindow(u)){ u=t.closest(u)[0] } q=j(u); if(!q){ q=new l(u); f.push(q) } var p=h(t, q), s=p < 0 ? $.fn[k].defaults: q.waypoints[p].options, r=$.extend({}, s, n); r.offset=r.offset==="bottom-in-view" ? function(){ var v=$.isWindow(u) ? $[m]("viewportHeight"): $(u).height(); return v - $(this).outerHeight() }:r.offset; if(p < 0){ q.waypoints.push({ element: t, offset: null, options: r }) }else{ q.waypoints[p].options=r } if(o){ t.bind(g, o) } if(n&&n.handler){ t.bind(g, n.handler) }}); $[m]("refresh"); return this }, remove: function(){ return this.each(function(o, p){ var n=$(p); $.each(f, function(r, s){ var q=h(n, s); if(q >=0){ s.waypoints.splice(q, 1); if(!s.waypoints.length){ s.element.unbind("scroll.waypoints resize.waypoints"); f.splice(r, 1) }} }) }) }, destroy: function(){ return this.unbind(g)[k]("remove") }}, a={ refresh: function(){ $.each(f, function(r, s){ var q=$.isWindow(s.element[0]), n=q ? 0: s.element.offset().top, p=q ? $[m]("viewportHeight"): s.element.height(), o=q ? 0: s.element.scrollTop(); $.each(s.waypoints, function(u, x){ if(!x){ return } var t=x.options.offset, w=x.offset; if(typeof x.options.offset==="function"){ t=x.options.offset.apply(x.element) }else{ if(typeof x.options.offset==="string"){ var v=parseFloat(x.options.offset); t=x.options.offset.indexOf("%") ? Math.ceil(p * (v / 100)):v }} x.offset=x.element.offset().top - n + o - t; if(x.options.onlyOnScroll){ return } if(w!==null&&s.oldScroll > w&&s.oldScroll <=x.offset){ b(x, ["up"]) }else{ if(w!==null&&s.oldScroll < w&&s.oldScroll >=x.offset){ b(x, ["down"]) }else{ if(!w&&s.element.scrollTop() > x.offset){ b(x, ["down"]) }} }}); s.waypoints.sort(function(u, t){ return u.offset - t.offset }) }) }, viewportHeight: function(){ return (i.innerHeight ? i.innerHeight:e.height()) }, aggregate: function(){ var n=$(); $.each(f, function(o, p){ $.each(p.waypoints, function(q, r){ n=n.add(r.element) }) }); return n }}; $.fn[k]=function(n){ if(c[n]){ return c[n].apply(this, Array.prototype.slice.call(arguments, 1)) }else{ if(typeof n==="function"||!n){ return c.init.apply(this, arguments) }else{ if(typeof n==="object"){ return c.init.apply(this, [null, n]) }else{ $.error("Method " + n + " does not exist on jQuery " + k) }} }}; $.fn[k].defaults={ continuous: true, offset: 0, triggerOnce: false, context: i }; $[m]=function(n){ if(a[n]){ return a[n].apply(this) }else{ return a.aggregate() }}; $[m].settings={ resizeThrottle: 200, scrollThrottle: 100 }; e.load(function(){ $[m]("refresh") }) })(jQuery, "waypoint", "waypoints", window); var windowHeight; var windowWidth; var settings; var retina=false; var $j=jQuery.noConflict(); jQuery(document).ready(function($){ 'use strict'; settings={ enableAnimations: $j("body").attr("data-animated"), enableLoader: $j("body").attr("data-loader"), landingSliderAnimationType: $j("section.landing").attr("data-slider-animation-type"), landingSliderAnimationSpeed: parseInt($j("section.landing").attr("data-slider-animation-speed")), landingSliderSpeed: parseInt($j("section.landing").attr("data-slider-speed")), portfolioAllText: "All", portfolioEnableFullscreen: $j("section.portfolio").attr("data-fullscreen"), portfolioEnableSharing: $j("section.portfolio").attr("data-social"), portfolioItemsPerPage: 10 } var mediaQuery='(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)'; var root=(typeof exports==='undefined' ? window:exports); if(root.devicePixelRatio > 1){ if(root.matchMedia&&root.matchMedia(mediaQuery).matches){ retina=true; }} $j(".background.image").each(function(){ var img=$j(this).attr("data-url"); if(img==undefined) return false; $j(this).css("background-image", "url("+img+")"); }); $j(".background.video").each(function(){ var video=$j(this).attr("data-url"); var poster=$j(this).attr("data-poster"); if(video==undefined) return false; var h=""; $j(this).html(h); }); $j(".background").each(function(){ if($j(this).hasClass("overlay-dark")) $j(this).append("
"); if($j(this).hasClass("overlay-light")) $j(this).append("
"); }); $j("a[href^='#']").click(function(event){ event.preventDefault(); $j('html,body').stop().animate({scrollTop: $j($j(this).attr("href")).position().top-80}, 'slow'); }); $j("nav.navigation .header .close").click(function(){ $j("nav.navigation").removeClass("active"); adjustSizes(); }); $j(".social-links li").each(function(){ var c=$j(this).attr("class"); $j(this).find("a").addClass("button icon light "+c).text(""); }); $j("header.header .menu").click(function(){ $j("header.header").toggleClass("active"); playAnimations(); $j("nav.navigation").toggleClass("active"); adjustSizes(); }); $j("section.blog .pagination .page-numbers").text(""); $j("section.blog .pagination .prev").addClass("button icon icon-arrow icon-arrow-right light"); $j("section.blog .pagination .next").addClass("button icon icon-arrow icon-arrow-left light"); var portfolio=$j("section.portfolio"); if(portfolio.length > 0){ if(portfolio.find(".filter .content ul .all").length){ var filterList=portfolio.find(".filter .albums .content ul"); }else{ portfolio.find(".filter .albums .content ul li").eq(0).addClass("selected"); } var filterSelected=portfolio.find(".filter .albums .content ul li").eq(0).text(); portfolio.find(".filter .albums span.selected").text(filterSelected); $j("section.portfolio.filterbar .filter .albums li").click(function(){ console.info("click"); if(!$j(this).hasClass("selected")){ $j(this).addClass("selected").siblings().removeClass("selected"); loadPortfolio("filterbar"); }}); $j("section.portfolio.toolbar .filter .albums span.selected, section.portfolio.toolbar .filter .order span.selected").click(function(){ var grid=$j("section.portfolio.toolbar .grid"); var list=$j(this).parent().find("ul"); if(grid.hasClass("blurred")){ if(list.hasClass("active")){ list.removeClass("active"); setTimeout(function(){ list.removeClass("visible"); }, 600); grid.removeClass("blurred"); }else{ $j("section.portfolio.toolbar .filter ul").removeClass("active"); $j("section.portfolio.toolbar .filter ul").removeClass("visible"); list.addClass("visible"); setTimeout(function(){ list.addClass("active"); }, 100); }}else{ grid.addClass("blurred"); list.addClass("visible"); setTimeout(function(){ list.addClass("active"); }, 100); }}); console.info("ejecutando"); $j('section.portfolio') $j("section.portfolio.toolbar .filter .albums li span").click(function(){ if(!$j(this).parent().hasClass("selected")){ var album=$j(this).text(); var item=$j(this).parent(); $j("section.portfolio.toolbar .filter .albums span.selected").text(album); item.addClass("selected").siblings().removeClass("selected"); $j("section.portfolio.toolbar .grid").removeClass("blurred"); $j("section.portfolio.toolbar .filter .albums ul").removeClass("active"); loadPortfolio("toolbar"); }else{ $j("section.portfolio.toolbar .grid").removeClass("blurred"); $j("section.portfolio.toolbar .filter .albums ul").removeClass("active"); }}); $j("section.portfolio.toolbar .filter .order li span").click(function(){ if(!$j(this).parent().hasClass("selected")){ var order=$j(this).text(); var orderType=$j(this).parent().attr("data-type"); var item=$j(this).parent(); $j("section.portfolio.toolbar .filter .order span.selected").text(order); item.addClass("selected").siblings().removeClass("selected"); var grid=$j("section.portfolio.toolbar .grid").removeClass("blurred"); var list=$j("section.portfolio.toolbar .filter .order ul").removeClass("active"); loadPortfolio("toolbar"); }else{ var grid=$j("section.portfolio.toolbar .grid").removeClass("blurred").addClass(orderType); var list=$j("section.portfolio.toolbar .filter .order ul").removeClass("active"); }}); $j("section.portfolio.sidebar .filter .albums .content > ul > li").click(function(){ console.info("Click en grande"); if(!$j(this).hasClass("selected")){ $('li.selected').removeClass('selected'); $j(this).addClass("selected").siblings().removeClass("selected"); $j('.album-hijos').slideUp(); $j(this).find('.album-hijos').slideDown(); loadPortfolio("sidebar"); }}); $j("section.portfolio.sidebar .filter .albums .content ul.album-hijos > li").click(function(e){ e.stopPropagation(); console.info("Click en pequeña"); if(!$j(this).hasClass("selected")){ $('li.selected').removeClass('selected'); $j(this).addClass('selected'); loadPortfolio("sidebar"); }}); $j("section.portfolio .filter .albums .content").find("select").change(function(){ loadPortfolio("select"); }); } $j("section.social-sharing .facebook").click(function(){ var url=$j(location).attr('href'); window.open("https://www.facebook.com/sharer/sharer.php?u="+url, "Share", "width=600, height=400, status=no, toolbar=no, menubar=no"); }); $j("section.social-sharing .twitter").click(function(){ var url=$j(location).attr('href'); window.open("https://twitter.com/home?status="+url, "Share", "width=600, height=400, status=no, toolbar=no, menubar=no"); }); $j("section.social-sharing .google").click(function(){ var url=$j(location).attr('href'); window.open("https://plus.google.com/share?url="+url, "Share", "width=600, height=400, status=no, toolbar=no, menubar=no"); }); $j("section.social-sharing .email").click(function(){ var url=$j(location).attr('href'); window.open("mailto:?body="+url,"_parent"); }); }); jQuery(window).load(function($){ adjustSizes(); loadPortfolio(); playLoader(); playAnimations(); playSlider(); getVersion(); }); jQuery(window).resize(function($){ adjustSizes(); }); var currentAlbum; var currentOrder; var currentSelector; var firstLoad=true; function loadPortfolio(selectorType){ if(selectorType!=undefined||selectorType!=null){ currentSelector=selectorType; } var portfolio=$j("section.portfolio"); var grid=portfolio.find(".grid > .content"); grid.attr("data-width", grid.width()); portfolio.css('min-height', windowHeight); var albumFilter=portfolio.find(".filter .albums .content"); var orderFilter=portfolio.find(".filter .order .content"); if(currentSelector=="select"){ var album=albumFilter.find("select").find("option:selected").attr("data-album"); }else{ var album=albumFilter.find("li.selected").attr("data-album"); } var albumChanged=true; if(currentAlbum==album){ albumChanged=false; }else{ currentAlbum=album; } var order=orderFilter.find("li.selected").attr("data-type"); if(order===undefined) order="masonry"; portfolio.removeClass("list masonry grid"); var orderChanged=true; if(currentOrder==order){ orderChanged=false; }else{ currentOrder=order; } if(albumChanged||orderChanged) grid.find(".row").remove(); if(albumChanged||orderChanged) grid.find(".file").removeClass("visible active awake"); if(album=="all"){ grid.children(".file").addClass("active"); }else{ grid.children(".file").each(function(){ var itemAlbum=$j(this).find("span[data-album]").attr("data-album"); var itemZona=$j(this).find("span[data-zona]").attr("data-zona"); itemZona=itemZona.split(' '); console.log("zona: ",itemZona," album: ",itemAlbum, " - ", itemZona.indexOf(album)); if(itemZona.indexOf(album)!=-1){ $j(this).addClass("active"); }else{ $j(this).removeClass("active selected"); }}); } var loadStep=settings.portfolioItemsPerPage; var currentlyLoaded=parseInt(grid.children(".awake").length); var totalItems=parseInt(grid.children(".active").length); var target=currentlyLoaded + loadStep; if(target > totalItems) target=totalItems; for (var i=currentlyLoaded; i < target; i++){ var item=grid.find(".active").eq(i); var itemAlbum=item.find("span[data-album]").attr("data-album"); var itemZona=item.find("span[data-zona]").attr("data-zona"); itemZona=itemZona.split(' '); if(itemAlbum==album||album=="all"||itemZona.indexOf(album)!=-1) item.addClass("selected"); }; portfolio.find(".more.row").remove(); var loaderIcon='' portfolio.find(".grid").after("
"+loaderIcon+"
"); var counter=0; grid.children(".selected").each(function(){ var item=$j(this); var itemType=$j(this).find("span[data-type]").attr("data-type"); var itemSource=$j(this).find("span[data-source]").attr("data-source"); var image=$j("").attr('src', itemSource).load(function(){ if(!this.complete||typeof this.naturalWidth=="undefined"||this.naturalWidth==0){ console.log("("+this.src+") is broken :'("); }else{ var imageHeight=this.naturalHeight; var imagePath=this.src; var imageWidth=this.naturalWidth; item.css("background-image", "url("+imagePath+")"); item.addClass("awake"); item.attr("data-width", imageWidth).attr("data-height", imageHeight); item.addClass(itemType); } counter+=1; if(counter==(grid.children(".selected").length)){ var images=grid.children(".selected"); var rowHeight=parseInt(grid.attr("data-item-height")); var colMargin=0; var containerWidth=grid.attr("data-width"); var totalItemWidth=0; if(grid.find(".row").length==0) grid.append("
"); if(grid.find(".row").length==grid.find(".row.full").length){ grid.append("
"); }else{ grid.find(".row").last().find(".file").each(function(){ totalItemWidth +=parseInt($j(this).attr("itemWidthRatio")); }); } var rowCounter=0; images.each(function(){ var item=$j(this); var type=item.find("span[data-source]").attr("data-source"); var itemWidth=item.attr("data-width"); var itemHeight=item.attr("data-height"); var itemWidthRatio=rowHeight * (itemWidth/itemHeight); var itemWidthTemp=(itemWidth / rowHeight) * 100; itemWidthTemp=itemWidthTemp - colMargin; item.attr("itemWidthRatio", itemWidthRatio).css("width", itemWidthRatio); var totalItemWidthRatio=containerWidth/totalItemWidth; if(order=="masonry"){ var ref=1.5; if(rowCounter==0) ref=2; if(totalItemWidthRatio > ref&&containerWidth > 479){ item.removeClass("selected"); var itemHTML=item[0].outerHTML; grid.find(".row").last().append(itemHTML); totalItemWidth +=itemWidthRatio; }else{ totalItemWidth=itemWidthRatio; item.removeClass("selected"); var itemHTML=item[0].outerHTML; grid.find(".row").last().append(itemHTML); var totalItemWidth2=0; grid.find(".row").last().find(".file").each(function(){ totalItemWidth2 +=parseInt($j(this).attr("itemWidthRatio")); }); var widthDiff=totalItemWidth2 - containerWidth; if(totalItemWidth2 < containerWidth) widthDiff=containerWidth - totalItemWidth2; grid.find(".row").last().find(".file").each(function(){ var i=parseInt($j(this).attr("itemWidthRatio")); var f=widthDiff * (i / totalItemWidth2); var r=i - f; if(totalItemWidth2 < containerWidth) r=i + f; var wi=(r / containerWidth) * 100; $j(this).css('width', wi + "%"); $j(this).attr("data-width-adapted", r); }); grid.find(".row").last().addClass("full"); grid.append("
"); rowCounter+=1; }}else{ var ref=0; if(order=="grid") ref=4; if(order=="list") ref=1; portfolio.addClass(order); var currentRowItems=grid.find(".row").last().find(".file").length; if(currentRowItems < ref&&containerWidth > 479){ item.removeClass("selected"); var itemHTML=item[0].outerHTML; grid.find(".row").last().append(itemHTML); }else{ grid.find(".row").last().addClass("full"); grid.append("
"); rowCounter+=1; item.removeClass("selected"); var itemHTML=item[0].outerHTML; grid.find(".row").last().append(itemHTML); }} }); grid.find(".row").each(function(){ $j(this).find("div").removeClass("awake active"); $j(this).find("div").addClass("view", "slow", "easeOutBack"); var overlay="
"; $j(this).find(".video").append(overlay); $j(this).find(".youtube").append(overlay); $j(this).find(".vimeo").append(overlay); if($j(this).find("div").length==0) $j(this).remove(); $j(this).find(".file").click(function(){ previewImage($j(this)); }); }); portfolio.find(".portfolio-loading").remove(); currentlyLoaded=parseInt(grid.children(".awake").length); totalItems=parseInt(grid.children(".active").length); if(currentlyLoaded==totalItems){ grid.find(".row").last().addClass("full"); }else{ if(!portfolio.find(".more.row").length){ portfolio.find(".grid").after("
"); } portfolio.find(".row.more button").click(function(){ loadPortfolio(); }); } if(firstLoad) loadURL(); firstLoad=false; }}); }); } function previewImage(image){ var image=image; var source=image.find(".properties span[data-source]").attr("data-source"); var source_2=image.find(".properties span[data-source-dos]").attr("data-source-dos"); var source_3=image.find(".properties span[data-source-tres]").attr("data-source-tres"); var source_4=image.find(".properties span[data-source-cuatro]").attr("data-source-cuatro"); var source_5=image.find(".properties span[data-source-cinco]").attr("data-source-cinco"); var source_6=image.find(".properties span[data-source-seis]").attr("data-source-seis"); var latitud_map=image.find(".properties span[data-latitud]").attr("data-latitud"); var longitud_map=image.find(".properties span[data-longitud]").attr("data-longitud"); var type=image.find(".properties span[data-type]").attr("data-type"); var url=image.find(".properties span[data-url]").attr("data-url"); var caption=image.find(".properties span[data-caption]").attr("data-caption"); var album=image.find(".properties span[data-album]").attr("data-album"); var current=$j('section.portfolio .grid .full .file.view').index(image); var total=$j('section.portfolio .grid .full .file.view').length; var slider_id=Math.random().toString(36).substr(2, 5); var frameHeight=windowHeight - 130; var frame; if(type=="image"){ frame="
"; frame +=""; frame +="
"; } if(type=="video"||type=="youtube"||type=="vimeo"){ frame="
"; frame +="
"; frame +="
"; frame +="
"; } var nav="

"+caption+"

"; var devider="
"; var meta="
"; image.find(".details span").each(function(){ if($j(this).attr("data-title")!="album"&&$j(this).attr("data-title")!="date"){ meta+="

"+$j(this).attr("data-title")+"

"+$j(this).text()+"

"; }}); meta +="
";*/ meta +="
"; meta +=""; $j.magnificPopup.open({ items: { src: "
"+frame+nav+meta+"
", type: "inline" }}); jQuery('#'+slider_id).carousel(); $j(".mfp-close").remove(); if(current==0) $j('.work-preview .prev').addClass("disabled"); if(current==total-1) $j('.work-preview .nav .next').addClass("disabled"); if(settings.portfolioEnableSharing=="true"){ var u=window.location.href; var s=u+"?f="+source; fixSharing(s); }else{ $j(".work-preview .social-links").addClass("disabled"); } if(type=="youtube"||type=="vimeo"||type=="video"){ var w=$j(".work-preview .frame .player").width(); var h=$j(".work-preview .frame .player").height(); if(type==="video"){ var d=""; }else if(type==="youtube"){ var d=''; }else if(type==="vimeo"){ var d='' } $j(".work-preview .frame .player").html(d); } if(settings.portfolioEnableFullscreen!="true") $j(".work-preview .frame .full-screen").addClass("hidden"); $j(".work-preview .frame").mousemove(function(){ $j(".work-preview .frame .full-screen").addClass("active"); }); $j(".work-preview .frame").mousestop(900, function(){ $j(".work-preview .frame .full-screen").removeClass("active"); }); function previewClose(){ var magnificPopup=$j.magnificPopup.instance; magnificPopup.close(); } function previewFullScreen(){ if($j(".work-preview .frame").hasClass("full")){ $j(".work-preview .frame").css("height", windowHeight - 130); $j(".work-preview .frame").removeClass("full"); }else{ $j(".work-preview .frame").css("height", windowHeight); $j(".work-preview .frame").addClass("full"); }} function previewPrev(){ if(current>0){ current--; var image=$j('section.portfolio .grid .full .file.view').eq(current); var source=image.find(".properties span[data-source]").attr("data-source"); var source_2=image.find(".properties span[data-source-dos]").attr("data-source-dos"); var source_3=image.find(".properties span[data-source-tres]").attr("data-source-tres"); var source_4=image.find(".properties span[data-source-cuatro]").attr("data-source-cuatro"); var source_5=image.find(".properties span[data-source-cinco]").attr("data-source-cinco"); var latitud_map=image.find(".properties span[data-latitud]").attr("data-latitud"); var longitud_map=image.find(".properties span[data-longitud]").attr("data-longitud"); var type=image.find(".properties span[data-type]").attr("data-type"); var url=image.find(".properties span[data-url]").attr("data-url"); var caption=image.find(".properties span[data-caption]").attr("data-caption"); var album=image.find(".properties span[data-album]").attr("data-album"); var frame; if(type=="image"){ frame="
"; frame +=""; frame +="
"; } if(type=="video"||type=="youtube"||type=="vimeo"){ frame="
"; frame +="
"; frame +="
"; frame +="
"; } $j('.work-preview .frame').replaceWith(frame); if(type=="youtube"||type=="vimeo"||type=="video"){ var w=$j(".work-preview .frame .player").width(); var h=$j(".work-preview .frame .player").height(); if(type==="video"){ var d=""; }else if(type==="youtube"){ var d=''; }else if(type==="vimeo"){ var d='' } $j(".work-preview .frame .player").html(d); } var caption="

"+caption+"

" $j('.work-preview .caption').replaceWith(caption); var meta="
"; image.find(".details span").each(function(){ if($j(this).attr("data-title")!="album"&&$j(this).attr("data-title")!="date"){ meta+="

"+$j(this).attr("data-title")+"

"+$j(this).text()+"

"; }}); meta+="
"; $j('.work-preview .meta > .details').replaceWith(meta); meta="
"; /*image.find(".details span").each(function(){ if($j(this).attr("data-title")=="album"||$j(this).attr("data-title")=="date"){ meta+="

"+$j(this).attr("data-title")+"

"+$j(this).text()+"

"; }});*/ meta +="
"; meta +=""; meta+="
"; meta+="
"; $j('.work-preview .meta .links .details').replaceWith(meta); if(current==0) $j('.work-preview .nav .prev').addClass("disabled"); if(current"; frame +=""; frame +=""; } if(type=="video"||type=="youtube"||type=="vimeo"){ frame="
"; frame +="
"; frame +="
"; } $j('.work-preview .frame').replaceWith(frame); if(type=="youtube"||type=="vimeo"||type=="video"){ var w=$j(".work-preview .frame .player").width(); var h=$j(".work-preview .frame .player").height(); if(type==="video"){ var d=""; }else if(type==="youtube"){ var d=''; }else if(type==="vimeo"){ var d='' } $j(".work-preview .frame .player").html(d); } var caption="

"+caption+"

" $j('.work-preview .caption').replaceWith(caption); var meta="
"; image.find(".details span").each(function(){ if($j(this).attr("data-title")!="album"&&$j(this).attr("data-title")!="date"){ meta+="

"+$j(this).attr("data-title")+"

"+$j(this).text()+"

"; }}); meta+="
"; $j('.work-preview .meta > .details').replaceWith(meta); meta="
"; /*image.find(".details span").each(function(){ if($j(this).attr("data-title")=="album"||$j(this).attr("data-title")=="date"){ meta+="

"+$j(this).attr("data-title")+"

"+$j(this).text()+"

"; }});*/ meta +="
"; meta +=""; meta+="
"; $j('.work-preview .meta .links .details').replaceWith(meta); if(!current==0) $j('.work-preview .nav .prev').removeClass("disabled"); if(current==total-1) $j('.work-preview .nav .next').addClass("disabled"); $j('.work-preview .full-screen').click(function(){ previewFullScreen(); }); }} $j('.work-preview .close').click(function(){ previewClose(); }); $j('.work-preview .full-screen').click(function(){ previewFullScreen(); }); $j('.work-preview .prev').click(function(){ previewPrev(); }); $j('.work-preview .next').click(function(){ previewNext(); }); $j('.work-preview .frame').on("swipeleft",function(){ previewNext(); }); $j('.work-preview .frame').on("swiperight",function(){ previewPrev(); }); $j(document).keydown(function(event){ var keycode=(event.keyCode ? event.keyCode:event.which); if(keycode=='37') previewPrev(); }); $j(document).keydown(function(event){ var keycode=(event.keyCode ? event.keyCode:event.which); if(keycode=='39') previewNext(); }); } function fixSharing(url){ var url=url; $j(".work-preview .social-links .facebook").click(function(){ window.open("https://www.facebook.com/sharer/sharer.php?u="+url, "Share", "width=600, height=400, status=no, toolbar=no, menubar=no"); }); $j(".work-preview .social-links .twitter").click(function(){ window.open("https://twitter.com/home?status="+url, "Share", "width=600, height=400, status=no, toolbar=no, menubar=no"); }); $j(".work-preview .social-links .google").click(function(){ window.open("https://plus.google.com/share?url="+url, "Share", "width=600, height=400, status=no, toolbar=no, menubar=no"); }); $j(".work-preview .social-links .email").click(function(){ window.open("mailto:?body="+url,"_parent"); }); } function loadURL(){ var file=getUrlParameter('f'); if(!file==""){ var s=$j("span[data-source='"+file+"']"); var f=s.parents(".file.view"); if(f.length==1){ previewImage(f); }else{ console.log("The file you are looking for doesn't exist :("); }}else{ console.log("There was no file parameters."); }} function playLoader(){ if(settings.enableLoader=="true"){ var loaderIcon='' $j("body").append("
"+loaderIcon+"
"); $j(".loading").delay(1000).fadeOut(1000, function(){ $j("body > .wrapper").animate({ opacity: 1 }, 1000); $j("body > .loading").remove(); }); }else{ $j("body > .wrapper").css("opacity", 1); }} function playAnimations(){ if(settings.enableAnimations=="true"){ var delay=0; if(settings.enableLoader=="true") delay=3000; $j(".animated").each(function(){ var item=$j(this); var t=item.offset().top; var r=windowHeight; item.css("opacity", 0); if(t .content"); grid.attr("data-item-height", 300); if(windowWidth < 767) grid.attr("data-item-height", 200); $j(".background.video").each(function(){ var h=windowHeight; var w=windowWidth; var rat=w/h; if(rat > (16/9)){ var v=w * (16/9); $j(this).find("video").css('width', w); $j(this).find("video").css('height', v); var vc=($j(this).find("video").height() - h) / 2; $j(this).find("video").css('margin-top', '-'+vc+'px'); $j(this).find("video").css('margin-left', '0px'); }else{ var v=h * (16/9); $j(this).find("video").css('height', h); $j(this).find("video").css('width', v); var vc=($j(this).find("video").width() - w) / 2; $j(this).find("video").css('margin-top', '0px'); $j(this).find("video").css('margin-left', '-'+vc+'px'); }}); } function adjustVideo(){ $j(".js-video").each(function(){ var poster=$j(this).attr("data-poster"); if(!poster=="") $j(this).css("background-image", "url("+poster+")"); }); } function playVideo(video){ var type=video.attr("data-type"); var url=video.attr("data-url"); var poster=video.attr("data-poster"); if(type=="video"){ var h=""; video.html(h); var h=video.height(); var w=video.width(); var rat=w / h; if(rat > (16/9)){ var v=w * (16/9); video.find("video").css('width', w); video.find("video").css('height', v); var vc=(video.find("video").height() - h) / 2; video.find("video").css('margin-top', '-'+vc+'px'); video.find("video").css('margin-left', '0px'); }else{ var v=h * (16/9); video.find("video").css('height', h); video.find("video").css('width', v); var vc=(video.find("video").width() - w) / 2; video.find("video").css('margin-top', '0px'); video.find("video").css('margin-left', '-'+vc+'px'); }}else if(type=="youtube"){ var h=""; video.html(h); } var container=video.parents(".item"); var controls=container.find(".controls"); controls.addClass("active"); } function getUrlParameter(sParam){ var sPageURL=window.location.search.substring(1); var sURLVariables=sPageURL.split('&'); for (var i=0; i < sURLVariables.length; i++){ var sParameterName=sURLVariables[i].split('='); if(sParameterName[0]==sParam){ return sParameterName[1]; }} } function getVersion(){ var version=$j("body").attr("data-version"); console.log("Turin WordPress Version: "+version); } function playSlider(){ var slider=$j(".slider"); var slides=slider.find(".slides"); var total=slides.find(".slide").length; if(total > 0){ slider.append("
    "); slides.find(".slide").each(function(){ var i=slides.find(".slide").index($j(this)) + 1; slider.find(".controls ul").append("
  • 0"+i+"
  • "); }); slider.find(".controls li").click(function(){ var control=slider.find(".controls li").eq($j(this)); var i=slider.find(".controls li").index($j(this)); var slide=slides.find(".slide").eq(i); slide.addClass("current").siblings().removeClass("current"); var control=slider.find(".controls li").eq(i); control.addClass("current").siblings().removeClass("current"); var selectedPos=control.position(); slider.find(".controls .selected").css("left", selectedPos.left); }); if(slides.find(".current").length==0){ var slide=slides.find(".slide").eq(0); slide.addClass("current"); var control=slider.find(".controls li").eq(0); control.addClass("current").siblings().removeClass("current"); var selectedPos=control.position(); slider.find(".controls .selected").css("left", selectedPos.left); } setInterval(function(){ var current; var currentSlide=slides.find(".slide.current"); var currentIndex=slides.find(".slide").index(currentSlide) + 1; var current=0; if(currentIndex < total) current=currentIndex; var slide=slides.find(".slide").eq(current); slide.addClass("current").siblings().removeClass("current"); var control=slider.find(".controls li").eq(current); control.addClass("current").siblings().removeClass("current"); var selectedPos=control.position(); if(currentIndex < total) slider.find(".controls .selected").addClass("expanded"); slider.find(".controls .selected").css("left", selectedPos.left); setTimeout(function (){ slider.find(".controls .selected").removeClass("expanded"); }, 4000); }, 7000); }} (function($){ $.event.special.mousestop={ setup: function(data){ $j(this).data('mousestop', _data(data)) .bind('mouseenter.mousestop', _mouseenter) .bind('mouseleave.mousestop', _mouseleave) .bind('mousemove.mousestop', _mousemove); }, teardown: function(){ $j(this).removeData('mousestop') .unbind('.mousestop'); }}; function _mouseenter(){ var _self=this, data=$j(this).data('mousestop'); this.movement=true; if(data.timeToStop){ this.timeToStopTimer=window.setTimeout(function(){ _self.movement=false; window.clearTimeout(_self.timer); }, data.timeToStop); }} function _mouseleave(){ window.clearTimeout(this.timer); window.clearTimeout(this.timeToStopTimer); } function _mousemove(){ var $el=$j(this), data=$el.data('mousestop'); if(this.movement){ window.clearTimeout(this.timer); this.timer=window.setTimeout(function(){ $el.trigger('mousestop'); }, data.delay); }} function _data(data){ if($.isNumeric(data)){ data={delay: data};} else if(typeof data!=='object'){ data={};} return $.extend({}, $.fn.mousestop.defaults, data); } $.fn.mousestop=function(data, fn){ if(typeof data==='function'){ fn=data; } return arguments.length > 0 ? this.bind('mousestop', data, fn):this.trigger('mousestop'); }; $.fn.mousestop.defaults={ delay: 300, timeToStop: null };})(jQuery); !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);